package com.corechina.apex_osswords.domain.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.corechina.apex_osswords.domain.entity.CoreVisitingRecords;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.corechina.apex_osswords.domain.vo.CoreVisitingRecordsVo;
import com.corechina.apex_osswords.domain.vo.VisitingStatisticsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 * 来访日志 Mapper 接口
 * </p>
 *
 * @author cc
 * @since 2022-05-30
 */
@Component
public interface CoreVisitingRecordsMapper extends BaseMapper<CoreVisitingRecords> {

    IPage<CoreVisitingRecordsVo> getList(Page page, @Param("enterpriseId") Integer enterpriseId, @Param("placeId") Integer placeId, @Param("company") String company, @Param("visitorName") String visitorName,
                                         @Param("visitingTimeBegin") String visitingTimeBegin, @Param("visitingTimeEnd") String visitingTimeEnd, @Param("departureTimeBegin") String departureTimeBegin, @Param("departureTimeEnd") String departureTimeEnd);

    CoreVisitingRecordsVo getOne(@Param("id") Integer id);


    List<VisitingStatisticsVo> getVisitingStatistics(@Param("enterpriseId") Integer enterpriseId, @Param("placeId") Integer placeId, @Param("visitingTimeBegin") String visitingTimeBegin, @Param("visitingTimeEnd") String visitingTimeEnd);

}
